#include <stdio.h>
#include <time.h>
#include <string.h>
int main()
{
struct tm date,*ptm;
 time_t t;
int nextterm=0;
time (&t);
 ptm=gmtime(&t);
int year=1900+ptm->tm_year;
printf("%d\n",year);
char * term="2013001";
char dest[5];
strncpy(dest, term,4);
dest[4]='\0';
printf("%s,---%d\n",dest,atoi(dest));
if(atoi(dest)<year)
 {
 char  n[8];
sprintf(n,"%d%s",year+1,"001");
n[8]='\0';
nextterm=atoi(n);
}else
{
 nextterm=atoi(term)+1;
}
printf("nextterm:%d\n",nextterm);
}
